<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<body>
<script>
// For http://crbug.com/748570
const leftButton = 0;
document.addEventListener('selectstart', () => {
    document.body.innerHTML = '<textarea></textarea>';
});

promise_test(() => {
  return new Promise((resolve, reject) => {
    assert_not_equals(window.chrome, undefined);
    assert_not_equals(window.chrome.gpuBenchmarking, undefined);
    // Click body
    chrome.gpuBenchmarking.pointerActionSequence(
      [{
        source: 'mouse',
        actions: [
          {
            name: 'pointerDown',
            button: leftButton,
            x: 0,
            y: 0,
          },
        ],
      }], resolve)
  }).then(() => assert_true(true, 'Pass if not crashed'));
}, 'selectstart to modify');
</script>
</body>
